package com.example.demo.area.controller;

import com.example.demo.area.service.IAreaService;
import com.example.demo.area.service.IAreaUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * ******************************************************
 *
 * @author liugh9
 * @version 1.0
 * @classname PushDataController
 * @description
 * @date 2024/01/13 13:47
 * <p>
 * ******************************************************
 */

@RestController
@RequestMapping("/push")
public class PushDataController {

    @Autowired
    private IAreaService areaService;
    @Autowired
    private IAreaUserService areaUserService;


    @GetMapping("/data")
    public void pushData() {
        areaService.insertAreaBatch(null);
        areaUserService.insertAreaUserBatch(null);
        areaService.compute();
    }
}
